@extends('mobile.layout1')
@section('title','首页')
	@section('css')
		<link rel="stylesheet" type="text/css" href="{{asset('FENXIAO/css/swiper.min.css')}}">


@endsection
@section('content')
<body>
	<div class="view-container mgn55">
		<div class="view-inner">
			<div class="swiper-container">
				<div class="swiper-wrapper">
					<div class="swiper-slide">
						<img class="swiper-goods-list-img swiper-lazy swiper-lazy-loaded" data-index="2" src="{{asset('FENXIAO/images/view_top.jpg')}}">
					</div>
					<div class="swiper-slide">
						<img class="swiper-goods-list-img swiper-lazy swiper-lazy-loaded" data-index="2" src="{{asset('FENXIAO/images/index_top.jpg')}}">
					</div>
				</div>
				<!-- 如果需要分页器 -->
				<div class="swiper-pagination"></div>
			</div>

			<ul class="images-list">
				@if(count($homepage)>0)
				@foreach($homepage as $v)
				<li>
					<a href="{{route('goods.show',['id'=>$v->goods_id])}}">
						<img src="{{$v->img}}">
					</a>
				</li>
				@endforeach
					@endif
			</ul>
			<div class="view-bottom">
				<img src="{{asset('FENXIAO/images/yugao.jpg')}}">
			</div>
		</div>
	</div>
	@inject('CartService','App\Interfaces\CartService')
	<div class="footer-nav">
		<ul class="nav-items">
			<li class="active">
				<a href="/">
					<div class="footer-icon1"></div>
					<span>商城</span>
				</a>
			</li>
			<li>
				<a href="/cart">
					<div class="footer-icon2"><em class="has-em" id="hidden" @if($CartService->getCartNumber() == 0)style="display: none" @endif></em>
					</div>
					<span>购物车</span>
				</a>
			</li>
			<li>
				<a href="/user">
					<div class="footer-icon3"></div>
					<span>会员中心</span>
				</a>
			</li>
		</ul>
	</div>
</body>
</html>
	@endsection
@section('js')
	<script type="text/javascript" src="{{asset('FENXIAO/js/common.js')}}"></script>
	<script type="text/javascript" src="{{asset('FENXIAO/js/swiper.min.js')}}"></script>
	<script>
        var mySwiper = new Swiper ('.swiper-container', {
            autoplay:{
                stopOnLastSlide:true,
                delay:3000,
            },
            loop: true,

            // 如果需要分页器
            pagination: {
                el: '.swiper-pagination',
            }
        })
	</script>
@endsection
